﻿using FarseerGames.FarseerPhysics.Mathematics;

namespace CymbergajTouch.Match
{
    /// <summary>
    /// Represents objects that can be moved by players.
    /// </summary>
    interface Movable
    {
        /// <summary>
        /// Checks whether this object should be considered to be grabbed if touch at given location.
        /// </summary>
        /// <param name="position">point of touch</param>
        /// <returns>true if object is touch, otherwise false</returns>
        bool IsTouched(Vector2 position);

        /// <summary>
        /// Informs this object that it is being grabbed by user.
        /// </summary>
        /// <param name="inputPosition">position of click</param>
        void Grab(Vector2 inputPosition);

        /// <summary>
        /// Tries to move this object to new position.
        /// </summary>
        /// <param name="newPosition">new position</param>
        void Move(Vector2 newPosition);

        /// <summary>
        /// Informs this object that it is being dropped by user.
        /// </summary>
        void Drop();
    }
}
